Hi Dave,
See below:
Group: DynoMotion |
Message: 7223 |
From: daves3891 |
Date: 4/10/2013 |
Subject: Re: Position question |
Thanks Tom,
> Now if I do a KM.CoordMotion.Interpreter.SetOrigin and set the offset to 10 it only offsets the position 10 motor counts and not 10 inches. Is this correct?
>Where are you seeing 10?
If I use that function to change the offset (G55) X value to 10 (passing 10 in the function) then when G55 is called by the interpreter it only changes the value of Destination[0] by 10.
Not Destination[0] + (10 * countsperinch) as I thought it would.
So am I correct in assuming that SetOrigin works in motor counts not inch units?
Thanks
Dave
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Dave,
>
> See below:
>
>
> ________________________________
> From: daves3891 <fahque99@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wednesday, April 10, 2013 2:07 PM
> Subject: [DynoMotion] Position question
>
>
> Â
> I am having trouble understanding how all the position / units work between the interpreter and Kflop
>
> KM.CurrentStatus.Destination[0] seems to return the position in motor steps?
>
> Â Â Correct
>
> If I set KM.CoordMotion.MotionParams.CountsPerInchX = 100; and run a G00 X1
>
> The KM.CurrentStatus.Destination[0] returns 100 not 1.
>
> Â Â Not sure what you mean. Â 100 motor steps would correspond to 1 inch in your example (assuming inches mode)
>
> Now if I do a KM.CoordMotion.Interpreter.SetOrigin and set the offset to 10 it only offsets the position 10 motor counts and not 10 inches. Is this correct?
>
> Â Â Where are you seeing 10?
>
> I would have figured that the interpreter section would scale everything based on the CountsPerInch?
>
> Â Â The Interpreter works in inches or mm. Â The Trajectory Planner converts to Steps when downloading to KFLOP
>
> In the KmotionCNC source I do not see it scaling the Destination[0] (dividing it by the counts per inch) but it still displays the correct scaled position.
>
> I think I am messing something up here but I am not sure what is what.
>
>
> Â Â It is somewhat complicated because the Coordinated Motion System can be defined in different ways. Â Also there can be Kinematic Transformations and Geometric Correction tables involved. Â And then the Interpreter can be in Inches or mm with additional offsets.
>
> KMotionCNC usesÂ
> Â Â int CCoordMotion::ReadCurAbsPosition(double *x, double *y, double *z, double *a, double *b, double *c, bool snap)
> Â Â which in turn uses:
>
> Â Â Kinematics->TransformActuatorstoCAD(Acts,&tx,&ty,&tz,&ta,&tb,&tc);
>
>
> Â Â and then
>
> Interpreter.CoordMotion.ConvertAbsoluteToInterpreterCoord(x,y,z,a,b,c,&x,&y,&z,&a,&b,&c);
>
> HTH
> Regards
> TK
>
>
> Any more information would be appreciated.
>
> Thanks
> Dave
>
|
|
Group: DynoMotion |
Message: 7224 |
From: Tom Kerekes |
Date: 4/10/2013 |
Subject: Re: Position question |
Hi Dave,
The G55 Origin Offset should be in Inches or mm depending on the Interpreter mode not steps.
But actually changing the G55 offset should not cause the
motor to move at all (Destination corresponds to where the motor is commanded to be in Steps). It would only apply the offset to future movements. It would also depend where you were in the first place, where you moved to, and also what the offset was before.
Regards TK
Group: DynoMotion |
Message: 7225 |
From: daves3891 |
Date: 4/10/2013 |
Subject: Re: Position question |
Hi Tom,
I understand that G55 will not move the motors.
With all the other CNC's in the shop, when a G55,56,57 etc is issued the DRO will change from the machine position to the position that it is in relation to the G55 offset.
Now in my GUI I need to set these G55,56,57 etc with the machine position in relation to the workspace, so should I just be passing the current Destination[0],[1],[2] to the setOrigin function (which would tell it the motor count position) or should this be in inch/mm units (motorcounts / countsperinch)?
Thanks
Dave
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Dave,
>
> The G55 Origin Offset should be in Inches or mm depending on the Interpreter mode not steps.
>
> But actually changing the G55 offset should not cause the motor to move at all (Destination corresponds to where the motor is commanded to be in Steps). Â It would only apply the offset to future movements. Â It would also depend where you were in the first place, where you moved to, and also what the offset was before.
>
> Regards
> TK
>
>
> ________________________________
> From: daves3891 <fahque99@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wednesday, April 10, 2013 4:05 PM
> Subject: [DynoMotion] Re: Position question
>
>
> Â
> Thanks Tom,
>
> > Now if I do a KM.CoordMotion.Interpreter.SetOrigin and set the offset to 10 it only offsets the position 10 motor counts and not 10 inches. Is this correct?
>
> >Where are you seeing 10?
>
> If I use that function to change the offset (G55) X value to 10 (passing 10 in the function) then when G55 is called by the interpreter it only changes the value of Destination[0] by 10.
> Not Destination[0] + (10 * countsperinch) as I thought it would.
>
> So am I correct in assuming that SetOrigin works in motor counts not inch units?
>
> Thanks
> Dave
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Dave,
> >
> > See below:
> >
> >
> > ________________________________
> > From: daves3891 <fahque99@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Wednesday, April 10, 2013 2:07 PM
> > Subject: [DynoMotion] Position question
> >
> >
> > ÃÂ
> > I am having trouble understanding how all the position / units work between the interpreter and Kflop
> >
> > KM.CurrentStatus.Destination[0] seems to return the position in motor steps?
> >
> > ÃÂ ÃÂ Correct
> >
> > If I set KM.CoordMotion.MotionParams.CountsPerInchX = 100; and run a G00 X1
> >
> > The KM.CurrentStatus.Destination[0] returns 100 not 1.
> >
> > ÃÂ ÃÂ Not sure what you mean. ÃÂ 100 motor steps would correspond to 1 inch in your example (assuming inches mode)
> >
> > Now if I do a KM.CoordMotion.Interpreter.SetOrigin and set the offset to 10 it only offsets the position 10 motor counts and not 10 inches. Is this correct?
> >
> > ÃÂ ÃÂ Where are you seeing 10?
> >
> > I would have figured that the interpreter section would scale everything based on the CountsPerInch?
> >
> > ÃÂ ÃÂ The Interpreter works in inches or mm. ÃÂ The Trajectory Planner converts to Steps when downloading to KFLOP
> >
> > In the KmotionCNC source I do not see it scaling the Destination[0] (dividing it by the counts per inch) but it still displays the correct scaled position.
> >
> > I think I am messing something up here but I am not sure what is what.
> >
> >
> > ÃÂ ÃÂ It is somewhat complicated because the Coordinated Motion System can be defined in different ways. ÃÂ Also there can be Kinematic Transformations and Geometric Correction tables involved. ÃÂ And then the Interpreter can be in Inches or mm with additional offsets.
> >
> > KMotionCNC usesÃÂ
> > ÃÂ ÃÂ int CCoordMotion::ReadCurAbsPosition(double *x, double *y, double *z, double *a, double *b, double *c, bool snap)
> > ÃÂ ÃÂ which in turn uses:
> >
> > ÃÂ ÃÂ Kinematics->TransformActuatorstoCAD(Acts,&tx,&ty,&tz,&ta,&tb,&tc);
> >
> >
> > ÃÂ ÃÂ and then
> >
> > Interpreter.CoordMotion.ConvertAbsoluteToInterpreterCoord(x,y,z,a,b,c,&x,&y,&z,&a,&b,&c);
> >
> > HTH
> > Regards
> > TK
> >
> >
> > Any more information would be appreciated.
> >
> > Thanks
> > Dave
> >
>
|
|
Group: DynoMotion |
Message: 7226 |
From: Tom Kerekes |
Date: 4/10/2013 |
Subject: Re: Position question |
Hi Dave,
I think I'm closer to understanding. You basically want to read the DROs and use that to adjust the G55 offset. To read the current Machine position in Interpreter Units use:
ReadCurMachinePosition
But you still are not being clear on exactly what you are trying to do. Setting the G55 offset to the current machine position may not zero the current Interpreter position if there are other offsets like G92.
Regards TK
Group: DynoMotion |
Message: 7227 |
From: daves3891 |
Date: 4/10/2013 |
Subject: Re: Position question |
Thanks Tom,
I am trying to allow the operator to set his workpiece offsets in a similar way to how the Fanuc systems we have use.
We position the tool to the center of the material and set the Z to the top of the surface.
We then go in to the offset menu which displays the machine positions that have been previously save.
We chose the table (G55, or 56, or 57 etc) and type in X0 then press the measure key. This will set the G5# offset to the current X machine position (Based from the home location being 0,0,0)
This is repeated for the Y and Z.
The operator will then edit the G5# in the program to be the correct one that has been saved to the workpiece that he wants to use.
Starts the program and everyone is happy.
We have not used G92 before so I don't think that offset should cause a problem.
Would the ReadCurMachinePosition return the same thing as the Destination[#]?
Thanks
Dave
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Dave,
>
> I think I'm closer to understanding. Â You basically want to read the DROs and use that to adjust the G55 offset. Â To read the current Machine position in Interpreter Units use:
>
> ReadCurMachinePosition
>
>
> But you still are not being clear on exactly what you are trying to do. Â Setting the G55 offset to the current machine position may not zero the current Interpreter position if there are other offsets like G92.
>
> Regards
> TK
>
>
> ________________________________
> From: daves3891 <fahque99@...>
> To: DynoMotion@yahoogroups.com
> Sent: Wednesday, April 10, 2013 5:45 PM
> Subject: [DynoMotion] Re: Position question
>
>
> Â
> Hi Tom,
>
> I understand that G55 will not move the motors.
> With all the other CNC's in the shop, when a G55,56,57 etc is issued the DRO will change from the machine position to the position that it is in relation to the G55 offset.
>
> Now in my GUI I need to set these G55,56,57 etc with the machine position in relation to the workspace, so should I just be passing the current Destination[0],[1],[2] to the setOrigin function (which would tell it the motor count position) or should this be in inch/mm units (motorcounts / countsperinch)?
>
> Thanks
> Dave
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Dave,
> >
> > The G55 Origin Offset should be in Inches or mm depending on the Interpreter mode not steps.
> >
> > But actually changing the G55 offset should not cause the motor to move at all (Destination corresponds to where the motor is commanded to be in Steps). ÃÂ It would only apply the offset to future movements. ÃÂ It would also depend where you were in the first place, where you moved to, and also what the offset was before.
> >
> > Regards
> > TK
> >
> >
> > ________________________________
> > From: daves3891 <fahque99@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Wednesday, April 10, 2013 4:05 PM
> > Subject: [DynoMotion] Re: Position question
> >
> >
> > ÃÂ
> > Thanks Tom,
> >
> > > Now if I do a KM.CoordMotion.Interpreter.SetOrigin and set the offset to 10 it only offsets the position 10 motor counts and not 10 inches. Is this correct?
> >
> > >Where are you seeing 10?
> >
> > If I use that function to change the offset (G55) X value to 10 (passing 10 in the function) then when G55 is called by the interpreter it only changes the value of Destination[0] by 10.
> > Not Destination[0] + (10 * countsperinch) as I thought it would.
> >
> > So am I correct in assuming that SetOrigin works in motor counts not inch units?
> >
> > Thanks
> > Dave
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Dave,
> > >
> > > See below:
> > >
> > >
> > > ________________________________
> > > From: daves3891 <fahque99@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Wednesday, April 10, 2013 2:07 PM
> > > Subject: [DynoMotion] Position question
> > >
> > >
> > > ÃâÃÂ
> > > I am having trouble understanding how all the position / units work between the interpreter and Kflop
> > >
> > > KM.CurrentStatus.Destination[0] seems to return the position in motor steps?
> > >
> > > ÃâàÃâàCorrect
> > >
> > > If I set KM.CoordMotion.MotionParams.CountsPerInchX = 100; and run a G00 X1
> > >
> > > The KM.CurrentStatus.Destination[0] returns 100 not 1.
> > >
> > > ÃâàÃâàNot sure what you mean. Ãâà100 motor steps would correspond to 1 inch in your example (assuming inches mode)
> > >
> > > Now if I do a KM.CoordMotion.Interpreter.SetOrigin and set the offset to 10 it only offsets the position 10 motor counts and not 10 inches. Is this correct?
> > >
> > > ÃâàÃâàWhere are you seeing 10?
> > >
> > > I would have figured that the interpreter section would scale everything based on the CountsPerInch?
> > >
> > > ÃâàÃâàThe Interpreter works in inches or mm. ÃâàThe Trajectory Planner converts to Steps when downloading to KFLOP
> > >
> > > In the KmotionCNC source I do not see it scaling the Destination[0] (dividing it by the counts per inch) but it still displays the correct scaled position.
> > >
> > > I think I am messing something up here but I am not sure what is what.
> > >
> > >
> > > ÃâàÃâàIt is somewhat complicated because the Coordinated Motion System can be defined in different ways. ÃâàAlso there can be Kinematic Transformations and Geometric Correction tables involved. ÃâàAnd then the Interpreter can be in Inches or mm with additional offsets.
> > >
> > > KMotionCNC usesÃâÃÂ
> > > ÃâàÃâàint CCoordMotion::ReadCurAbsPosition(double *x, double *y, double *z, double *a, double *b, double *c, bool snap)
> > > ÃâàÃâàwhich in turn uses:
> > >
> > > ÃâàÃâàKinematics->TransformActuatorstoCAD(Acts,&tx,&ty,&tz,&ta,&tb,&tc);
> > >
> > >
> > > ÃâàÃâàand then
> > >
> > > Interpreter.CoordMotion.ConvertAbsoluteToInterpreterCoord(x,y,z,a,b,c,&x,&y,&z,&a,&b,&c);
> > >
> > > HTH
> > > Regards
> > > TK
> > >
> > >
> > > Any more information would be appreciated.
> > >
> > > Thanks
> > > Dave
> > >
> >
>
|
|
Group: DynoMotion |
Message: 7234 |
From: daves3891 |
Date: 4/11/2013 |
Subject: Re: Position question |
OK, I have the offsets / Positions / DRO's figured out and working as I required.
One other problem I am having now is when I load a G code program and run the first line it seems to reset the previous SetOrigin to 0.0's
Is this normal?
The way I have my programs running is based with a single block command.
The interpreter runs one line from the file then the Complete_Callback checks if the single block button is active.
If it is then nothing happens, if it is not active then the line number is incremented and the next single line is interpreted.
I don't think this should cause the problem I am seeing.
Thanks
Dave
--- In DynoMotion@yahoogroups.com, "daves3891" <fahque99@...> wrote:
>
> I am having trouble understanding how all the position / units work between the interpreter and Kflop
>
> KM.CurrentStatus.Destination[0] seems to return the position in motor steps?
>
> If I set KM.CoordMotion.MotionParams.CountsPerInchX = 100; and run a G00 X1
>
> The KM.CurrentStatus.Destination[0] returns 100 not 1.
>
> Now if I do a KM.CoordMotion.Interpreter.SetOrigin and set the offset to 10 it only offsets the position 10 motor counts and not 10 inches. Is this correct?
>
> I would have figured that the interpreter section would scale everything based on the CountsPerInch?
>
>
> In the KmotionCNC source I do not see it scaling the Destination[0] (dividing it by the counts per inch) but it still displays the correct scaled position.
>
> I think I am messing something up here but I am not sure what is what.
>
>
>
> Any more information would be appreciated.
>
>
> Thanks
> Dave
>
|
|
| | | | | |